/**
 * PHOSIDE: PHosphorylation Site IDentification Engine.
 * Copyright 2009 Digital Biology Lab, University of Missouri.
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation; either version 3 of the License, or (at your option) any later
 * version. <p/> This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more
 * details.
 */

package phoside.knn.matrix.similarity;

import java.io.Serializable;

/**
 *
 * @author gjj
 */
public class SimilarityMatrixImpl implements SimilarityMatrix, Serializable {
    private static final long serialVersionUID = -568870291886104533L;
        
        protected double[][] matrix;
        protected String alphabet;

        public SimilarityMatrixImpl(final double[][] matrix,
                                    final String alphabet) {
                if (matrix==null || alphabet==null) {
                        throw new java.lang.NullPointerException();
                }
                if (matrix.length!=alphabet.length()) {
                        throw new java.lang.IllegalArgumentException("matrix and alphabet has different size");
                }

                this.matrix = matrix;
                
                this.alphabet = alphabet;
        }
        
        public double[][] getMatrix() {
               return matrix;
        }

        public void setMatrix(double[][] matrix) {
            this.matrix = matrix;
        }

        public String getAlphabet() {
                return alphabet;
        }

        public void setAlphabet(String alphabet) {
            this.alphabet = alphabet;
        }
}
